home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programmer's Power Pack / Delphi Volume 1.iso / s_to_z / tabutil / usage.txt < prev   
Text File  |  1996-09-15  |  2KB  |  33 lines

  1. type
  2.     TFFormat = (fftCSV, fftQuoted, fftFixed)  ;
  3.     TStatFunc = (sfMAX, sfMIN, sfAVG) ;
  4.  
  5. GetFieldName(alius, tabname:String; fldnum:Byte) : String ;
  6. {returns the field name of the field number <fldnum> for table <tabname> in database <alius>}
  7.  
  8. ColumnTotal(alius, tabname, valfield:String) : Double ;
  9. {returns the total of all values in field <valfield> for table <tabname> in database <alius>}
  10.  
  11. ColumnStatVal(statfunc:TStatFunc; alius, tabname, Valfield:String) : Double ;
  12. {returns the maximum/maximum/average value in field <valfield> for table <tabname> in database <alius>, depending upon TStatFunc type: so far thse can be sfMIN, sfMAX, sfAVG}
  13.  
  14. DS_ColumnTotal(datafrom:Tdataset; valfield:String) : Double ;
  15. {returns the total of all values in field <valfield> for dataset <datafrom> }
  16.  
  17. GroupSummary(alius, sourcetab, targettab, groupbyfield:String; valfields:TStringList) : Byte ;
  18. {creates a table <targettab> which has a summed value for each field listed in TStringList <valfields> for each unique entry in <groupbyfield>. Warning: destroys any any existing <targettab>. Returns 0 if successful}
  19.  
  20. ExportToTxt(alius, ourcetab:String; filenam:TFilename; Forma:TFFormat; withheader:Boolean) : Boolean ;
  21. {creates file <filenam> in format <Forma> from table <sourcetab> current outputs are: CSV(fftCSV), CSV with quoted text(fftQuoted). If withheader=true then first row is fieldnames}
  22.  
  23. DS_ExportToTxt(datafrom:TdataSet; filenam:TFilename; Forma:TFFormat; withheader:Boolean) : Boolean ;
  24. {creates file <filenam> in format <Forma> from Dataset <datafrom> current outputs are: CSV(fftCSV), CSV with quoted text(fftQuoted) If withheader=true then first row is fieldnames}
  25.  
  26. CreateFromCSV(alius, targettab:String; filenam:TFilename; withheader:Boolean) : Boolean ;
  27. {creates a table in DataBase <alius> of type ttDefault and Named <targettab> using the file <filenam> which must be CSV.
  28. If withheader=true the first row is taken as the field names. Warning: deletes any existing table <targettab>}
  29.  
  30. AppendFromCSV(alius, targettab:String; filenam:TFilename) : Boolean ;
  31. {appends records to existing table <targettab>. File <filenam> must have same number of fields in same order}
  32.  
  33.